<template>
	<view class="wap">
		<navbar :parameter='parameter'></navbar>
		<view class="box">
			<view class="title-line">{{details.name}}</view>
			<view class="details-box">
				<rich-text :nodes="details.content"></rich-text>
			</view>
		</view>
		<view style="height: 90rpx;"></view>
		<view @click="look()" class="order-btn">辅生绿通专员</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				parameter: {
					'navbar': '1',
					'return': '1',
					'title': '辅生绿通详情',
					'color': true,
					'class': 'on'
				},
				details: '',
				id: '',
			};
		},
		onLoad(option) {
			uni.setStorageSync('service_id',option.id)
			uni.setStorageSync('price', option.price)
			this.id = option.id;
			this.getdetail(option.id);
		},
		onShow() {

		},
		/**
		 * 用户点击右上角分享
		 */
		onShareAppMessage: function() {
			
		},
		onShareTimeline(res) { //分享到朋友圈
			
		},
		methods: {
			async getdetail(id) {
				const res = await this.$myRequest({
					url: '/api/index/fslt_detail',
					data: {
						id: id
					}
				})
				res.data.data.content = this.$richText(res.data.data.content);
				this.details = res.data.data;
			},
			look(){
				uni.navigateTo({
					url:'/bundle/pages/birth/commissioner'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.wap {
		padding: 30rpx;
		padding-bottom: 80rpx;
	}

	.box {
		width: 100%;
		border-radius: 20rpx;
		background-color: #fff;
		margin-bottom: 30rpx;
		padding: 30rpx;
	}

	.title-line {
		color: #000406;
		font-size: 33rpx;
		font-weight: 700;
		margin-bottom: 20rpx;
	}

	.details-box {
		margin-bottom: 30rpx;
	}
	.order-btn {
		position: absolute;
		bottom: 0;
		right: 0;
		left: 0;
		width: 100%;
		height: 90rpx;
		background: #347DFE;
		color: #fff;
		text-align: center;
		line-height: 90rpx;
	}
	
</style>
